#include <iostream>
#include <string>


#include "XMLParserDriver.h"
#include "DTDParserDriver.h"


int main(int argc, char** argv)
{
 
  DTDParserDriver dtdDriver;
  XMLParserDriver xmlDriver;
  XMLParserDriver xsltDriver;
  
  if (!xmlDriver.parse (argv[1]))
    std::cout << "DTD : " << xmlDriver.dtdFileName << std::endl;
  
  if (argv[2] == 0) {
    if (!dtdDriver.parse(xmlDriver.dtdFileName)) {
        std::cout << "DTD : " << std::endl;
        std::cout << dtdDriver.structure->getAffichage() << std::endl;
    }
  } else {
    if (!xsltDriver.parse(argv[2])) {
        xsltDriver.structure->Afficher();
        xmlDriver.structure->Afficher();
    }
  }
  
  if (xmlDriver.structure != 0) {
    xmlDriver.structure->Afficher();
  }

  return 0;
}
